<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        执行了的状态是不会改变的,只允许有一个状态,不能被覆盖

     -->
    <script>
        let pro = new Promise((resolve,reject)=>{
            // resolve('成功')
            reject('失败')
        })
        
    new Promise((resolve,reject)=>{
            // reject(pro)
            resolve(pro)
            
        }).then(
            suc=>{
                console.log(suc+'msg');
            },
            // null,
            // err=>{
            //     console.log(err+'err');
            // }
        ).then(
            suc=>{
                console.log(suc+'msg');
            },
            // null,
            err=>{
                console.log(err+'12345');
            }
        )
       
        console.log('我先');
    </script>
</body>
</html>